@bendyline/squisq 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (533) hide show
  1. package/dist/{Doc-Ch4tc3vv.d.ts → Doc-BeSeH2iX.d.ts} +118 -41
  2. package/dist/ImageEditDoc-BTIvw0oq.d.ts +84 -0
  3. package/dist/{chunk-CYQHG27J.js → chunk-2TMAWB4Y.js} +74 -1
  4. package/dist/chunk-2TMAWB4Y.js.map +1 -0
  5. package/dist/{chunk-OASJKWO5.js → chunk-3K5OG6KI.js} +92 -7
  6. package/dist/chunk-3K5OG6KI.js.map +1 -0
  7. package/dist/chunk-57CVQCFX.js +193 -0
  8. package/dist/chunk-57CVQCFX.js.map +1 -0
  9. package/dist/{chunk-QM5PKNPW.js → chunk-5WFRKURX.js} +1 -1
  10. package/dist/chunk-5WFRKURX.js.map +1 -0
  11. package/dist/chunk-B4EEON3N.js +1317 -0
  12. package/dist/chunk-B4EEON3N.js.map +1 -0
  13. package/dist/chunk-DBS6RIFL.js +81 -0
  14. package/dist/chunk-DBS6RIFL.js.map +1 -0
  15. package/dist/{chunk-MIBRIRGJ.js → chunk-FR2RBTKO.js} +3 -3
  16. package/dist/{chunk-MIBRIRGJ.js.map → chunk-FR2RBTKO.js.map} +1 -1
  17. package/dist/chunk-H3AXU4MJ.js +179 -0
  18. package/dist/chunk-H3AXU4MJ.js.map +1 -0
  19. package/dist/chunk-JELIRVDP.js +24 -0
  20. package/dist/chunk-JELIRVDP.js.map +1 -0
  21. package/dist/chunk-K32VJONL.js +193 -0
  22. package/dist/chunk-K32VJONL.js.map +1 -0
  23. package/dist/{chunk-6BAVXFYC.js → chunk-KSWJR66U.js} +218 -42
  24. package/dist/chunk-KSWJR66U.js.map +1 -0
  25. package/dist/{chunk-TSG2OSE6.js → chunk-MYIH7FWD.js} +3 -3
  26. package/dist/chunk-MYIH7FWD.js.map +1 -0
  27. package/dist/chunk-VLJJHDAC.js +218 -0
  28. package/dist/chunk-VLJJHDAC.js.map +1 -0
  29. package/dist/chunk-WMOI7FN3.js +182 -0
  30. package/dist/chunk-WMOI7FN3.js.map +1 -0
  31. package/dist/chunk-ZTX4PFFT.js +520 -0
  32. package/dist/chunk-ZTX4PFFT.js.map +1 -0
  33. package/dist/doc/index.d.ts +5 -10
  34. package/dist/doc/index.js +145 -7
  35. package/dist/doc/index.js.map +1 -1
  36. package/dist/generate/index.d.ts +99 -7
  37. package/dist/generate/index.js +16 -3
  38. package/dist/generate/index.js.map +1 -1
  39. package/dist/icons/index.d.ts +87 -0
  40. package/dist/icons/index.js +17 -0
  41. package/dist/icons/index.js.map +1 -0
  42. package/dist/imageEdit/index.d.ts +216 -0
  43. package/dist/imageEdit/index.js +54 -0
  44. package/dist/imageEdit/index.js.map +1 -0
  45. package/dist/index.d.ts +21 -9
  46. package/dist/index.js +461 -8
  47. package/dist/index.js.map +1 -1
  48. package/dist/jsonForm/index.d.ts +191 -0
  49. package/dist/jsonForm/index.js +27 -0
  50. package/dist/jsonForm/index.js.map +1 -0
  51. package/dist/markdown/index.d.ts +265 -19
  52. package/dist/markdown/index.js +39 -33
  53. package/dist/markdown/index.js.map +1 -1
  54. package/dist/random/index.d.ts +51 -2
  55. package/dist/random/index.js +9 -1
  56. package/dist/random/index.js.map +1 -1
  57. package/dist/recommend/index.d.ts +42 -0
  58. package/dist/recommend/index.js +10 -0
  59. package/dist/recommend/index.js.map +1 -0
  60. package/dist/schemas/index.d.ts +188 -10
  61. package/dist/schemas/index.js +120 -7
  62. package/dist/schemas/index.js.map +1 -1
  63. package/dist/spatial/index.d.ts +111 -3
  64. package/dist/spatial/index.js +24 -2
  65. package/dist/spatial/index.js.map +1 -1
  66. package/dist/storage/index.d.ts +159 -9
  67. package/dist/storage/index.js +20 -5
  68. package/dist/storage/index.js.map +1 -1
  69. package/dist/story/index.d.ts +53 -13
  70. package/dist/story/index.js +12 -4
  71. package/dist/themeLibrary-BHjJ0Qx6.d.ts +40 -0
  72. package/dist/timing/index.d.ts +109 -4
  73. package/dist/timing/index.js +23 -2
  74. package/dist/timing/index.js.map +1 -1
  75. package/dist/transform/index.d.ts +175 -6
  76. package/dist/transform/index.js +490 -3
  77. package/dist/transform/index.js.map +1 -1
  78. package/dist/{types-CkNttVSF.d.ts → types-BdZkdJ3z.d.ts} +17 -2
  79. package/dist/types-D98li1gV.d.ts +93 -0
  80. package/dist/versions/index.d.ts +128 -0
  81. package/dist/versions/index.js +35 -0
  82. package/dist/versions/index.js.map +1 -0
  83. package/package.json +28 -1
  84. package/src/__tests__/colorUtils.test.ts +112 -0
  85. package/src/__tests__/getLayers.test.ts +32 -7
  86. package/src/__tests__/iconResolve.test.ts +122 -0
  87. package/src/__tests__/imageEditState.test.ts +74 -0
  88. package/src/__tests__/imageEditVersions.test.ts +169 -0
  89. package/src/__tests__/inferDocumentTitle.test.ts +50 -0
  90. package/src/__tests__/jsonForm.chooseControl.test.ts +86 -0
  91. package/src/__tests__/jsonForm.evaluateWhen.test.ts +59 -0
  92. package/src/__tests__/jsonForm.inferSchema.test.ts +25 -0
  93. package/src/__tests__/jsonForm.pointer.test.ts +103 -0
  94. package/src/__tests__/markdownIcons.test.ts +104 -0
  95. package/src/__tests__/markdownToDoc.test.ts +19 -4
  96. package/src/__tests__/recommendTemplates.test.ts +183 -0
  97. package/src/__tests__/scopedContentContainer.test.ts +89 -0
  98. package/src/__tests__/slideshowGenerator.test.ts +1 -1
  99. package/src/__tests__/templateAnnotationParse.test.ts +42 -0
  100. package/src/__tests__/templates.test.ts +93 -9
  101. package/src/__tests__/themeCompile.test.ts +156 -0
  102. package/src/__tests__/themeValidator.test.ts +125 -0
  103. package/src/__tests__/versions.test.ts +415 -0
  104. package/src/doc/audioMapping.ts +55 -11
  105. package/src/doc/getLayers.ts +32 -21
  106. package/src/doc/markdownToDoc.ts +45 -7
  107. package/src/doc/templates/featureBlock.ts +202 -0
  108. package/src/doc/templates/fullBleedQuote.ts +13 -0
  109. package/src/doc/templates/index.ts +50 -16
  110. package/src/doc/templates/listBlock.ts +24 -5
  111. package/src/doc/templates/statHighlight.ts +13 -0
  112. package/src/doc/templates/titleBlock.ts +9 -0
  113. package/src/doc/utils/themeUtils.ts +8 -7
  114. package/src/generate/slideshowGenerator.ts +1 -1
  115. package/src/generate/templateMapper.ts +2 -2
  116. package/src/icons/iconData.ts +31 -0
  117. package/src/icons/index.ts +18 -0
  118. package/src/icons/resolve.ts +139 -0
  119. package/src/imageEdit/ImageEditVersionManager.ts +73 -0
  120. package/src/imageEdit/export.ts +326 -0
  121. package/src/imageEdit/index.ts +71 -0
  122. package/src/imageEdit/persistence.ts +62 -0
  123. package/src/imageEdit/state.ts +112 -0
  124. package/src/imageEdit/versionPaths.ts +57 -0
  125. package/src/imageEdit/versions.ts +231 -0
  126. package/src/index.ts +4 -0
  127. package/src/jsonForm/chooseControl.ts +88 -0
  128. package/src/jsonForm/evaluateWhen.ts +59 -0
  129. package/src/jsonForm/index.ts +22 -0
  130. package/src/jsonForm/inferSchema.ts +25 -0
  131. package/src/jsonForm/pointer.ts +109 -0
  132. package/src/jsonForm/types.ts +167 -0
  133. package/src/markdown/convert.ts +145 -5
  134. package/src/markdown/index.ts +3 -0
  135. package/src/markdown/types.ts +19 -2
  136. package/src/markdown/utils.ts +159 -0
  137. package/src/recommend/index.ts +16 -0
  138. package/src/recommend/templates.ts +273 -0
  139. package/src/schemas/BlockTemplates.ts +50 -7
  140. package/src/schemas/ImageEditDoc.ts +95 -0
  141. package/src/schemas/Theme.ts +98 -31
  142. package/src/schemas/colorUtils.ts +186 -0
  143. package/src/schemas/fontStacks.ts +257 -0
  144. package/src/schemas/index.ts +12 -0
  145. package/src/schemas/themeCompile.ts +203 -0
  146. package/src/schemas/themeLibrary.ts +18 -597
  147. package/src/schemas/themeValidator.ts +388 -0
  148. package/src/schemas/themes/bold.json +48 -0
  149. package/src/schemas/themes/cinematic.json +54 -0
  150. package/src/schemas/themes/documentary.json +49 -0
  151. package/src/schemas/themes/gezellig.json +44 -0
  152. package/src/schemas/themes/index.ts +53 -0
  153. package/src/schemas/themes/magazine.json +44 -0
  154. package/src/schemas/themes/minimalist.json +45 -0
  155. package/src/schemas/themes/morning-light.json +42 -0
  156. package/src/schemas/themes/standard-dark.json +50 -0
  157. package/src/schemas/themes/standard.json +42 -0
  158. package/src/schemas/themes/tech-dark.json +48 -0
  159. package/src/schemas/themes/warm-earth.json +50 -0
  160. package/src/storage/ScopedContentContainer.ts +113 -0
  161. package/src/storage/index.ts +1 -0
  162. package/src/versions/DocumentVersionManager.ts +70 -0
  163. package/src/versions/index.ts +54 -0
  164. package/src/versions/operations.ts +230 -0
  165. package/src/versions/paths.ts +66 -0
  166. package/src/versions/timestamp.ts +48 -0
  167. package/src/versions/types.ts +91 -0
  168. package/dist/__tests__/animationUtils.test.d.ts +0 -2
  169. package/dist/__tests__/animationUtils.test.d.ts.map +0 -1
  170. package/dist/__tests__/animationUtils.test.js +0 -60
  171. package/dist/__tests__/animationUtils.test.js.map +0 -1
  172. package/dist/__tests__/contentContainer.test.d.ts +0 -2
  173. package/dist/__tests__/contentContainer.test.d.ts.map +0 -1
  174. package/dist/__tests__/contentContainer.test.js +0 -234
  175. package/dist/__tests__/contentContainer.test.js.map +0 -1
  176. package/dist/__tests__/contentExtractor.test.d.ts +0 -2
  177. package/dist/__tests__/contentExtractor.test.d.ts.map +0 -1
  178. package/dist/__tests__/contentExtractor.test.js +0 -151
  179. package/dist/__tests__/contentExtractor.test.js.map +0 -1
  180. package/dist/__tests__/coverBlock.test.d.ts +0 -2
  181. package/dist/__tests__/coverBlock.test.d.ts.map +0 -1
  182. package/dist/__tests__/coverBlock.test.js +0 -197
  183. package/dist/__tests__/coverBlock.test.js.map +0 -1
  184. package/dist/__tests__/dataTable.test.d.ts +0 -2
  185. package/dist/__tests__/dataTable.test.d.ts.map +0 -1
  186. package/dist/__tests__/dataTable.test.js +0 -110
  187. package/dist/__tests__/dataTable.test.js.map +0 -1
  188. package/dist/__tests__/geohash.test.d.ts +0 -2
  189. package/dist/__tests__/geohash.test.d.ts.map +0 -1
  190. package/dist/__tests__/geohash.test.js +0 -87
  191. package/dist/__tests__/geohash.test.js.map +0 -1
  192. package/dist/__tests__/getLayers.test.d.ts +0 -2
  193. package/dist/__tests__/getLayers.test.d.ts.map +0 -1
  194. package/dist/__tests__/getLayers.test.js +0 -167
  195. package/dist/__tests__/getLayers.test.js.map +0 -1
  196. package/dist/__tests__/haversine.test.d.ts +0 -2
  197. package/dist/__tests__/haversine.test.d.ts.map +0 -1
  198. package/dist/__tests__/haversine.test.js +0 -56
  199. package/dist/__tests__/haversine.test.js.map +0 -1
  200. package/dist/__tests__/localForageAdapter.test.d.ts +0 -8
  201. package/dist/__tests__/localForageAdapter.test.d.ts.map +0 -1
  202. package/dist/__tests__/localForageAdapter.test.js +0 -130
  203. package/dist/__tests__/localForageAdapter.test.js.map +0 -1
  204. package/dist/__tests__/markdown.test.d.ts +0 -2
  205. package/dist/__tests__/markdown.test.d.ts.map +0 -1
  206. package/dist/__tests__/markdown.test.js +0 -715
  207. package/dist/__tests__/markdown.test.js.map +0 -1
  208. package/dist/__tests__/markdownToDoc.test.d.ts +0 -2
  209. package/dist/__tests__/markdownToDoc.test.d.ts.map +0 -1
  210. package/dist/__tests__/markdownToDoc.test.js +0 -447
  211. package/dist/__tests__/markdownToDoc.test.js.map +0 -1
  212. package/dist/__tests__/seededRandom.test.d.ts +0 -2
  213. package/dist/__tests__/seededRandom.test.d.ts.map +0 -1
  214. package/dist/__tests__/seededRandom.test.js +0 -125
  215. package/dist/__tests__/seededRandom.test.js.map +0 -1
  216. package/dist/__tests__/slideshowGenerator.test.d.ts +0 -2
  217. package/dist/__tests__/slideshowGenerator.test.d.ts.map +0 -1
  218. package/dist/__tests__/slideshowGenerator.test.js +0 -114
  219. package/dist/__tests__/slideshowGenerator.test.js.map +0 -1
  220. package/dist/__tests__/storage.test.d.ts +0 -2
  221. package/dist/__tests__/storage.test.d.ts.map +0 -1
  222. package/dist/__tests__/storage.test.js +0 -51
  223. package/dist/__tests__/storage.test.js.map +0 -1
  224. package/dist/__tests__/surface.test.d.ts +0 -2
  225. package/dist/__tests__/surface.test.d.ts.map +0 -1
  226. package/dist/__tests__/surface.test.js +0 -57
  227. package/dist/__tests__/surface.test.js.map +0 -1
  228. package/dist/__tests__/templates.test.d.ts +0 -2
  229. package/dist/__tests__/templates.test.d.ts.map +0 -1
  230. package/dist/__tests__/templates.test.js +0 -217
  231. package/dist/__tests__/templates.test.js.map +0 -1
  232. package/dist/__tests__/timing.test.d.ts +0 -2
  233. package/dist/__tests__/timing.test.d.ts.map +0 -1
  234. package/dist/__tests__/timing.test.js +0 -131
  235. package/dist/__tests__/timing.test.js.map +0 -1
  236. package/dist/chunk-6BAVXFYC.js.map +0 -1
  237. package/dist/chunk-7GF6RDED.js +0 -82
  238. package/dist/chunk-7GF6RDED.js.map +0 -1
  239. package/dist/chunk-CYQHG27J.js.map +0 -1
  240. package/dist/chunk-F22AE6BY.js +0 -121
  241. package/dist/chunk-F22AE6BY.js.map +0 -1
  242. package/dist/chunk-FIQR4AJG.js +0 -517
  243. package/dist/chunk-FIQR4AJG.js.map +0 -1
  244. package/dist/chunk-OASJKWO5.js.map +0 -1
  245. package/dist/chunk-QM5PKNPW.js.map +0 -1
  246. package/dist/chunk-TSG2OSE6.js.map +0 -1
  247. package/dist/doc/audioMapping.d.ts +0 -36
  248. package/dist/doc/audioMapping.d.ts.map +0 -1
  249. package/dist/doc/audioMapping.js +0 -315
  250. package/dist/doc/audioMapping.js.map +0 -1
  251. package/dist/doc/docToMarkdown.d.ts +0 -41
  252. package/dist/doc/docToMarkdown.d.ts.map +0 -1
  253. package/dist/doc/docToMarkdown.js +0 -88
  254. package/dist/doc/docToMarkdown.js.map +0 -1
  255. package/dist/doc/getLayers.d.ts +0 -65
  256. package/dist/doc/getLayers.d.ts.map +0 -1
  257. package/dist/doc/getLayers.js +0 -103
  258. package/dist/doc/getLayers.js.map +0 -1
  259. package/dist/doc/index.d.ts.map +0 -1
  260. package/dist/doc/markdownToDoc.d.ts +0 -75
  261. package/dist/doc/markdownToDoc.d.ts.map +0 -1
  262. package/dist/doc/markdownToDoc.js +0 -398
  263. package/dist/doc/markdownToDoc.js.map +0 -1
  264. package/dist/doc/templates/accentImage.d.ts +0 -59
  265. package/dist/doc/templates/accentImage.d.ts.map +0 -1
  266. package/dist/doc/templates/accentImage.js +0 -275
  267. package/dist/doc/templates/accentImage.js.map +0 -1
  268. package/dist/doc/templates/captionUtils.d.ts +0 -20
  269. package/dist/doc/templates/captionUtils.d.ts.map +0 -1
  270. package/dist/doc/templates/captionUtils.js +0 -29
  271. package/dist/doc/templates/captionUtils.js.map +0 -1
  272. package/dist/doc/templates/comparisonBar.d.ts +0 -13
  273. package/dist/doc/templates/comparisonBar.d.ts.map +0 -1
  274. package/dist/doc/templates/comparisonBar.js +0 -145
  275. package/dist/doc/templates/comparisonBar.js.map +0 -1
  276. package/dist/doc/templates/coverBlock.d.ts +0 -51
  277. package/dist/doc/templates/coverBlock.d.ts.map +0 -1
  278. package/dist/doc/templates/coverBlock.js +0 -153
  279. package/dist/doc/templates/coverBlock.js.map +0 -1
  280. package/dist/doc/templates/dataTable.d.ts +0 -14
  281. package/dist/doc/templates/dataTable.d.ts.map +0 -1
  282. package/dist/doc/templates/dataTable.js +0 -73
  283. package/dist/doc/templates/dataTable.js.map +0 -1
  284. package/dist/doc/templates/dateEvent.d.ts +0 -15
  285. package/dist/doc/templates/dateEvent.d.ts.map +0 -1
  286. package/dist/doc/templates/dateEvent.js +0 -114
  287. package/dist/doc/templates/dateEvent.js.map +0 -1
  288. package/dist/doc/templates/definitionCard.d.ts +0 -13
  289. package/dist/doc/templates/definitionCard.d.ts.map +0 -1
  290. package/dist/doc/templates/definitionCard.js +0 -117
  291. package/dist/doc/templates/definitionCard.js.map +0 -1
  292. package/dist/doc/templates/factCard.d.ts +0 -15
  293. package/dist/doc/templates/factCard.d.ts.map +0 -1
  294. package/dist/doc/templates/factCard.js +0 -104
  295. package/dist/doc/templates/factCard.js.map +0 -1
  296. package/dist/doc/templates/fullBleedQuote.d.ts +0 -13
  297. package/dist/doc/templates/fullBleedQuote.d.ts.map +0 -1
  298. package/dist/doc/templates/fullBleedQuote.js +0 -55
  299. package/dist/doc/templates/fullBleedQuote.js.map +0 -1
  300. package/dist/doc/templates/imageWithCaption.d.ts +0 -13
  301. package/dist/doc/templates/imageWithCaption.d.ts.map +0 -1
  302. package/dist/doc/templates/imageWithCaption.js +0 -146
  303. package/dist/doc/templates/imageWithCaption.js.map +0 -1
  304. package/dist/doc/templates/index.d.ts +0 -105
  305. package/dist/doc/templates/index.d.ts.map +0 -1
  306. package/dist/doc/templates/index.js +0 -445
  307. package/dist/doc/templates/index.js.map +0 -1
  308. package/dist/doc/templates/listBlock.d.ts +0 -13
  309. package/dist/doc/templates/listBlock.d.ts.map +0 -1
  310. package/dist/doc/templates/listBlock.js +0 -92
  311. package/dist/doc/templates/listBlock.js.map +0 -1
  312. package/dist/doc/templates/mapBlock.d.ts +0 -17
  313. package/dist/doc/templates/mapBlock.d.ts.map +0 -1
  314. package/dist/doc/templates/mapBlock.js +0 -115
  315. package/dist/doc/templates/mapBlock.js.map +0 -1
  316. package/dist/doc/templates/persistentLayers.d.ts +0 -39
  317. package/dist/doc/templates/persistentLayers.d.ts.map +0 -1
  318. package/dist/doc/templates/persistentLayers.js +0 -447
  319. package/dist/doc/templates/persistentLayers.js.map +0 -1
  320. package/dist/doc/templates/photoGrid.d.ts +0 -20
  321. package/dist/doc/templates/photoGrid.d.ts.map +0 -1
  322. package/dist/doc/templates/photoGrid.js +0 -175
  323. package/dist/doc/templates/photoGrid.js.map +0 -1
  324. package/dist/doc/templates/pullQuote.d.ts +0 -13
  325. package/dist/doc/templates/pullQuote.d.ts.map +0 -1
  326. package/dist/doc/templates/pullQuote.js +0 -113
  327. package/dist/doc/templates/pullQuote.js.map +0 -1
  328. package/dist/doc/templates/quoteBlock.d.ts +0 -15
  329. package/dist/doc/templates/quoteBlock.d.ts.map +0 -1
  330. package/dist/doc/templates/quoteBlock.js +0 -101
  331. package/dist/doc/templates/quoteBlock.js.map +0 -1
  332. package/dist/doc/templates/sectionHeader.d.ts +0 -14
  333. package/dist/doc/templates/sectionHeader.d.ts.map +0 -1
  334. package/dist/doc/templates/sectionHeader.js +0 -97
  335. package/dist/doc/templates/sectionHeader.js.map +0 -1
  336. package/dist/doc/templates/statHighlight.d.ts +0 -15
  337. package/dist/doc/templates/statHighlight.d.ts.map +0 -1
  338. package/dist/doc/templates/statHighlight.js +0 -102
  339. package/dist/doc/templates/statHighlight.js.map +0 -1
  340. package/dist/doc/templates/titleBlock.d.ts +0 -13
  341. package/dist/doc/templates/titleBlock.d.ts.map +0 -1
  342. package/dist/doc/templates/titleBlock.js +0 -95
  343. package/dist/doc/templates/titleBlock.js.map +0 -1
  344. package/dist/doc/templates/twoColumn.d.ts +0 -15
  345. package/dist/doc/templates/twoColumn.d.ts.map +0 -1
  346. package/dist/doc/templates/twoColumn.js +0 -225
  347. package/dist/doc/templates/twoColumn.js.map +0 -1
  348. package/dist/doc/templates/videoPullQuote.d.ts +0 -20
  349. package/dist/doc/templates/videoPullQuote.d.ts.map +0 -1
  350. package/dist/doc/templates/videoPullQuote.js +0 -122
  351. package/dist/doc/templates/videoPullQuote.js.map +0 -1
  352. package/dist/doc/templates/videoWithCaption.d.ts +0 -20
  353. package/dist/doc/templates/videoWithCaption.d.ts.map +0 -1
  354. package/dist/doc/templates/videoWithCaption.js +0 -107
  355. package/dist/doc/templates/videoWithCaption.js.map +0 -1
  356. package/dist/doc/utils/animationUtils.d.ts +0 -34
  357. package/dist/doc/utils/animationUtils.d.ts.map +0 -1
  358. package/dist/doc/utils/animationUtils.js +0 -110
  359. package/dist/doc/utils/animationUtils.js.map +0 -1
  360. package/dist/doc/utils/themeUtils.d.ts +0 -64
  361. package/dist/doc/utils/themeUtils.d.ts.map +0 -1
  362. package/dist/doc/utils/themeUtils.js +0 -135
  363. package/dist/doc/utils/themeUtils.js.map +0 -1
  364. package/dist/generate/contentExtractor.d.ts +0 -112
  365. package/dist/generate/contentExtractor.d.ts.map +0 -1
  366. package/dist/generate/contentExtractor.js +0 -638
  367. package/dist/generate/contentExtractor.js.map +0 -1
  368. package/dist/generate/index.d.ts.map +0 -1
  369. package/dist/generate/slideshowGenerator.d.ts +0 -72
  370. package/dist/generate/slideshowGenerator.d.ts.map +0 -1
  371. package/dist/generate/slideshowGenerator.js +0 -159
  372. package/dist/generate/slideshowGenerator.js.map +0 -1
  373. package/dist/generate/templateMapper.d.ts +0 -23
  374. package/dist/generate/templateMapper.d.ts.map +0 -1
  375. package/dist/generate/templateMapper.js +0 -114
  376. package/dist/generate/templateMapper.js.map +0 -1
  377. package/dist/index.d.ts.map +0 -1
  378. package/dist/markdown/convert.d.ts +0 -71
  379. package/dist/markdown/convert.d.ts.map +0 -1
  380. package/dist/markdown/convert.js +0 -845
  381. package/dist/markdown/convert.js.map +0 -1
  382. package/dist/markdown/htmlParse.d.ts +0 -26
  383. package/dist/markdown/htmlParse.d.ts.map +0 -1
  384. package/dist/markdown/htmlParse.js +0 -195
  385. package/dist/markdown/htmlParse.js.map +0 -1
  386. package/dist/markdown/index.d.ts.map +0 -1
  387. package/dist/markdown/parse.d.ts +0 -27
  388. package/dist/markdown/parse.d.ts.map +0 -1
  389. package/dist/markdown/parse.js +0 -90
  390. package/dist/markdown/parse.js.map +0 -1
  391. package/dist/markdown/stringify.d.ts +0 -32
  392. package/dist/markdown/stringify.d.ts.map +0 -1
  393. package/dist/markdown/stringify.js +0 -108
  394. package/dist/markdown/stringify.js.map +0 -1
  395. package/dist/markdown/types.d.ts +0 -516
  396. package/dist/markdown/types.d.ts.map +0 -1
  397. package/dist/markdown/types.js +0 -17
  398. package/dist/markdown/types.js.map +0 -1
  399. package/dist/markdown/utils.d.ts +0 -78
  400. package/dist/markdown/utils.d.ts.map +0 -1
  401. package/dist/markdown/utils.js +0 -153
  402. package/dist/markdown/utils.js.map +0 -1
  403. package/dist/random/SeededRandom.d.ts +0 -50
  404. package/dist/random/SeededRandom.d.ts.map +0 -1
  405. package/dist/random/SeededRandom.js +0 -115
  406. package/dist/random/SeededRandom.js.map +0 -1
  407. package/dist/random/index.d.ts.map +0 -1
  408. package/dist/schemas/BlockTemplates.d.ts +0 -600
  409. package/dist/schemas/BlockTemplates.d.ts.map +0 -1
  410. package/dist/schemas/BlockTemplates.js +0 -72
  411. package/dist/schemas/BlockTemplates.js.map +0 -1
  412. package/dist/schemas/Doc.d.ts +0 -503
  413. package/dist/schemas/Doc.d.ts.map +0 -1
  414. package/dist/schemas/Doc.js +0 -90
  415. package/dist/schemas/Doc.js.map +0 -1
  416. package/dist/schemas/LayoutStrategy.d.ts +0 -84
  417. package/dist/schemas/LayoutStrategy.d.ts.map +0 -1
  418. package/dist/schemas/LayoutStrategy.js +0 -123
  419. package/dist/schemas/LayoutStrategy.js.map +0 -1
  420. package/dist/schemas/MediaProvider.d.ts +0 -65
  421. package/dist/schemas/MediaProvider.d.ts.map +0 -1
  422. package/dist/schemas/MediaProvider.js +0 -13
  423. package/dist/schemas/MediaProvider.js.map +0 -1
  424. package/dist/schemas/Theme.d.ts +0 -194
  425. package/dist/schemas/Theme.d.ts.map +0 -1
  426. package/dist/schemas/Theme.js +0 -97
  427. package/dist/schemas/Theme.js.map +0 -1
  428. package/dist/schemas/Types.d.ts +0 -14
  429. package/dist/schemas/Types.d.ts.map +0 -1
  430. package/dist/schemas/Types.js +0 -5
  431. package/dist/schemas/Types.js.map +0 -1
  432. package/dist/schemas/Viewport.d.ts +0 -74
  433. package/dist/schemas/Viewport.d.ts.map +0 -1
  434. package/dist/schemas/Viewport.js +0 -63
  435. package/dist/schemas/Viewport.js.map +0 -1
  436. package/dist/schemas/index.d.ts.map +0 -1
  437. package/dist/schemas/themeLibrary.d.ts +0 -41
  438. package/dist/schemas/themeLibrary.d.ts.map +0 -1
  439. package/dist/schemas/themeLibrary.js +0 -597
  440. package/dist/schemas/themeLibrary.js.map +0 -1
  441. package/dist/spatial/Geohash.d.ts +0 -85
  442. package/dist/spatial/Geohash.d.ts.map +0 -1
  443. package/dist/spatial/Geohash.js +0 -142
  444. package/dist/spatial/Geohash.js.map +0 -1
  445. package/dist/spatial/Haversine.d.ts +0 -24
  446. package/dist/spatial/Haversine.d.ts.map +0 -1
  447. package/dist/spatial/Haversine.js +0 -48
  448. package/dist/spatial/Haversine.js.map +0 -1
  449. package/dist/spatial/index.d.ts.map +0 -1
  450. package/dist/storage/ContentContainer.d.ts +0 -87
  451. package/dist/storage/ContentContainer.d.ts.map +0 -1
  452. package/dist/storage/ContentContainer.js +0 -131
  453. package/dist/storage/ContentContainer.js.map +0 -1
  454. package/dist/storage/LocalForageAdapter.d.ts +0 -36
  455. package/dist/storage/LocalForageAdapter.d.ts.map +0 -1
  456. package/dist/storage/LocalForageAdapter.js +0 -82
  457. package/dist/storage/LocalForageAdapter.js.map +0 -1
  458. package/dist/storage/LocalStorageAdapter.d.ts +0 -16
  459. package/dist/storage/LocalStorageAdapter.d.ts.map +0 -1
  460. package/dist/storage/LocalStorageAdapter.js +0 -50
  461. package/dist/storage/LocalStorageAdapter.js.map +0 -1
  462. package/dist/storage/MediaProviderFromContainer.d.ts +0 -21
  463. package/dist/storage/MediaProviderFromContainer.d.ts.map +0 -1
  464. package/dist/storage/MediaProviderFromContainer.js +0 -79
  465. package/dist/storage/MediaProviderFromContainer.js.map +0 -1
  466. package/dist/storage/MemoryStorageAdapter.d.ts +0 -15
  467. package/dist/storage/MemoryStorageAdapter.d.ts.map +0 -1
  468. package/dist/storage/MemoryStorageAdapter.js +0 -34
  469. package/dist/storage/MemoryStorageAdapter.js.map +0 -1
  470. package/dist/storage/Storage.d.ts +0 -23
  471. package/dist/storage/Storage.d.ts.map +0 -1
  472. package/dist/storage/Storage.js +0 -9
  473. package/dist/storage/Storage.js.map +0 -1
  474. package/dist/storage/index.d.ts.map +0 -1
  475. package/dist/themeLibrary-CEo2D4b6.d.ts +0 -44
  476. package/dist/timing/index.d.ts.map +0 -1
  477. package/dist/timing/narrationTiming.d.ts +0 -54
  478. package/dist/timing/narrationTiming.d.ts.map +0 -1
  479. package/dist/timing/narrationTiming.js +0 -190
  480. package/dist/timing/narrationTiming.js.map +0 -1
  481. package/dist/timing/readingTime.d.ts +0 -54
  482. package/dist/timing/readingTime.d.ts.map +0 -1
  483. package/dist/timing/readingTime.js +0 -49
  484. package/dist/timing/readingTime.js.map +0 -1
  485. package/dist/transform/applyTransform.d.ts +0 -22
  486. package/dist/transform/applyTransform.d.ts.map +0 -1
  487. package/dist/transform/applyTransform.js +0 -68
  488. package/dist/transform/applyTransform.js.map +0 -1
  489. package/dist/transform/blockAnalyzer.d.ts +0 -48
  490. package/dist/transform/blockAnalyzer.d.ts.map +0 -1
  491. package/dist/transform/blockAnalyzer.js +0 -135
  492. package/dist/transform/blockAnalyzer.js.map +0 -1
  493. package/dist/transform/index.d.ts.map +0 -1
  494. package/dist/transform/registry.d.ts +0 -19
  495. package/dist/transform/registry.d.ts.map +0 -1
  496. package/dist/transform/registry.js +0 -41
  497. package/dist/transform/registry.js.map +0 -1
  498. package/dist/transform/styles/dataDriven.d.ts +0 -4
  499. package/dist/transform/styles/dataDriven.d.ts.map +0 -1
  500. package/dist/transform/styles/dataDriven.js +0 -15
  501. package/dist/transform/styles/dataDriven.js.map +0 -1
  502. package/dist/transform/styles/documentary.d.ts +0 -4
  503. package/dist/transform/styles/documentary.d.ts.map +0 -1
  504. package/dist/transform/styles/documentary.js +0 -15
  505. package/dist/transform/styles/documentary.js.map +0 -1
  506. package/dist/transform/styles/index.d.ts +0 -6
  507. package/dist/transform/styles/index.d.ts.map +0 -1
  508. package/dist/transform/styles/index.js +0 -6
  509. package/dist/transform/styles/index.js.map +0 -1
  510. package/dist/transform/styles/magazine.d.ts +0 -4
  511. package/dist/transform/styles/magazine.d.ts.map +0 -1
  512. package/dist/transform/styles/magazine.js +0 -15
  513. package/dist/transform/styles/magazine.js.map +0 -1
  514. package/dist/transform/styles/minimal.d.ts +0 -4
  515. package/dist/transform/styles/minimal.d.ts.map +0 -1
  516. package/dist/transform/styles/minimal.js +0 -15
  517. package/dist/transform/styles/minimal.js.map +0 -1
  518. package/dist/transform/styles/narrative.d.ts +0 -4
  519. package/dist/transform/styles/narrative.d.ts.map +0 -1
  520. package/dist/transform/styles/narrative.js +0 -15
  521. package/dist/transform/styles/narrative.js.map +0 -1
  522. package/dist/transform/templateSelector.d.ts +0 -30
  523. package/dist/transform/templateSelector.d.ts.map +0 -1
  524. package/dist/transform/templateSelector.js +0 -218
  525. package/dist/transform/templateSelector.js.map +0 -1
  526. package/dist/transform/timingAllocator.d.ts +0 -21
  527. package/dist/transform/timingAllocator.d.ts.map +0 -1
  528. package/dist/transform/timingAllocator.js +0 -111
  529. package/dist/transform/timingAllocator.js.map +0 -1
  530. package/dist/transform/types.d.ts +0 -86
  531. package/dist/transform/types.d.ts.map +0 -1
  532. package/dist/transform/types.js +0 -9
  533. package/dist/transform/types.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { M as MarkdownBlockNode, p as MarkdownHeading } from './types-CkNttVSF.js';
1
+ import { M as MarkdownBlockNode, p as MarkdownHeading } from './types-BdZkdJ3z.js';
2
2
 
3
3
  /**
4
4
  * Viewport Configuration
@@ -163,17 +163,28 @@ declare function getSafeTextBounds(orientation: ViewportOrientation): {
163
163
  *
164
164
  * A Theme bundles color palette, typography, visual style, render-style
165
165
  * algorithm, and per-block color schemes into one JSON-serializable object.
166
- * Builders choose a theme from the built-in library or create a custom one
167
- * via `createTheme(base, overrides)`.
166
+ *
167
+ * Built-in themes and customizer-authored themes share this exact schema.
168
+ * Customizer-authored themes additionally specify `seedColors` so the few
169
+ * fields the user picked can be re-edited later; built-ins typically omit
170
+ * `seedColors` and ship with explicit `colors` already filled in.
168
171
  *
169
172
  * Design principles:
170
- * - Fully JSON-serializable (no functions) storable in config / APIs.
171
- * - Doc carries an optional `themeId` pointer; resolution happens at render time.
172
- * - `createTheme` deep-merges a base theme with partial overrides.
173
+ * - Fully JSON-serializable. No functions; no raw CSS font strings.
174
+ * - Font families are structured `FontFamily` references resolved by
175
+ * `resolveFontFamily()` at render time.
176
+ * - Doc carries an optional `themeId`; resolution happens at render time
177
+ * via `resolveTheme(id)`.
178
+ * - `createTheme` deep-merges a base theme with partial overrides;
179
+ * `compileTheme` fills in defaults and derives missing color slots from
180
+ * `seedColors`; both produce a complete `Theme`.
173
181
  */
174
182
 
183
+ /** Current Theme schema version. Bump on breaking changes; loader migrates. */
184
+ declare const THEME_SCHEMA_VERSION: "1";
185
+ type ThemeSchemaVersion = typeof THEME_SCHEMA_VERSION;
175
186
  /**
176
- * Core color palette for a theme. Every color is a CSS color string.
187
+ * Core color palette for a theme. Every color is a `#rrggbb` hex string.
177
188
  */
178
189
  interface ThemeColorPalette {
179
190
  /** Primary accent color */
@@ -205,16 +216,44 @@ interface ThemeColorScheme {
205
216
  /** Accent / secondary tint */
206
217
  accent: string;
207
218
  }
219
+ /**
220
+ * Optional authoring metadata. When present and `colors` is partial,
221
+ * `compileTheme` derives missing color slots from these seeds via OKLCh
222
+ * lightening / darkening. Round-trips a customizer-authored theme back
223
+ * into editable form.
224
+ */
225
+ interface ThemeSeedColors {
226
+ primary: string;
227
+ secondary?: string;
228
+ accent?: string;
229
+ background?: string;
230
+ text?: string;
231
+ }
232
+ /** Categorical bucket for a font family — drives default fallback. */
233
+ type FontFamilyKind = 'sans' | 'serif' | 'mono' | 'display';
234
+ /**
235
+ * Structured reference to a font family. Either a curated stack id (looked
236
+ * up in `AVAILABLE_FONT_STACKS`) or a custom user-supplied name with a
237
+ * structured fallback bucket. Themes never carry raw CSS family strings.
238
+ */
239
+ type FontFamily = {
240
+ stackId: string;
241
+ } | {
242
+ custom: {
243
+ name: string;
244
+ fallback: 'serif' | 'sans-serif' | 'monospace' | 'system-ui';
245
+ };
246
+ };
208
247
  /**
209
248
  * Typography settings for a theme.
210
249
  */
211
250
  interface ThemeTypography {
212
251
  /** Font family for body / description text */
213
- bodyFontFamily: string;
252
+ bodyFont: FontFamily;
214
253
  /** Font family for titles and headings */
215
- titleFontFamily: string;
254
+ titleFont: FontFamily;
216
255
  /** Font family for code / monospaced text (optional) */
217
- monoFontFamily?: string;
256
+ monoFont?: FontFamily;
218
257
  /** Multiplier applied to LayoutHints.titleScale (default 1.0) */
219
258
  titleScale?: number;
220
259
  /** Multiplier applied to LayoutHints.bodyScale (default 1.0) */
@@ -264,24 +303,26 @@ interface RenderStyle {
264
303
  /**
265
304
  * Per-template behavioral hints. Keys are template names, values are
266
305
  * string/number/boolean maps that templates can read to vary their output.
267
- *
268
- * @example
269
- * ```
270
- * { statHighlight: { entrance: 'dramatic' }, titleBlock: { showAccentLine: false } }
271
- * ```
306
+ * Templates that consume hints publish a `hintSchema` export documenting
307
+ * the keys they recognise.
272
308
  */
273
309
  templateHints?: Record<string, Record<string, string | number | boolean>>;
274
310
  }
275
311
  /**
276
- * A complete, JSON-serializable theme definition.
312
+ * A complete, JSON-serializable theme definition. Built-in and customizer-
313
+ * authored themes share this exact shape.
277
314
  */
278
315
  interface Theme {
316
+ /** Schema version. Always '1' for now. */
317
+ schemaVersion: ThemeSchemaVersion;
279
318
  /** Unique identifier (e.g. "documentary") */
280
319
  id: string;
281
320
  /** Human-readable display name */
282
321
  name: string;
283
322
  /** Short description for theme pickers */
284
323
  description?: string;
324
+ /** Optional authoring seeds (customizer fills these; built-ins typically omit) */
325
+ seedColors?: ThemeSeedColors;
285
326
  /** Color palette */
286
327
  colors: ThemeColorPalette;
287
328
  /** Typography settings */
@@ -308,14 +349,6 @@ type DeepPartial<T> = {
308
349
  * Create a new theme by deep-merging overrides onto a base theme.
309
350
  * The returned theme gets its own `id` if one is provided in overrides,
310
351
  * otherwise keeps the base theme's `id` suffixed with "-custom".
311
- *
312
- * @example
313
- * ```ts
314
- * const myTheme = createTheme(THEMES.documentary, {
315
- * colors: { primary: '#ff0000' },
316
- * typography: { bodyFontFamily: '"Inter", sans-serif' },
317
- * });
318
- * ```
319
352
  */
320
353
  declare function createTheme(base: Theme, overrides: DeepPartial<Theme>): Theme;
321
354
  /**
@@ -323,11 +356,6 @@ declare function createTheme(base: Theme, overrides: DeepPartial<Theme>): Theme;
323
356
  * identity of a Theme. A Theme chooses voice (serif vs sans, muted vs
324
357
  * bold, documentary vs magazine); a SurfaceScheme chooses what the paper
325
358
  * looks like. Any theme can render on either surface.
326
- *
327
- * When a SurfaceScheme is applied to a Theme (via `applySurface`), these
328
- * fields override the corresponding entries in `ThemeColorPalette` —
329
- * everything else (primary, highlight, warning, etc.) stays as the theme
330
- * defined it.
331
359
  */
332
360
  interface SurfaceScheme {
333
361
  /** Identifier — 'light', 'dark', or a custom id. */
@@ -344,28 +372,39 @@ declare const DARK_SURFACE: SurfaceScheme;
344
372
  /**
345
373
  * Overlay a SurfaceScheme's surface colors onto a Theme's palette,
346
374
  * leaving everything else (primary, highlight, warning, typography,
347
- * style, renderStyle, colorSchemes) untouched. Returns a new Theme;
348
- * callers that want to preserve the original's id should set it
349
- * explicitly in the overrides.
375
+ * style, renderStyle, colorSchemes) untouched.
350
376
  */
351
377
  declare function applySurface(theme: Theme, surface: SurfaceScheme): Theme;
378
+ /**
379
+ * Register a Theme so it can be looked up by id via `resolveTheme(id)`.
380
+ * Lets `Doc.themeId` round-trip through Doc serialization for custom themes.
381
+ *
382
+ * Registered themes take precedence over built-ins with the same id.
383
+ */
384
+ declare function registerTheme(theme: Theme): void;
385
+ /** Remove a previously registered theme. */
386
+ declare function unregisterTheme(id: string): void;
387
+ /** Snapshot of all currently registered (non-built-in) themes. */
388
+ declare function getRegisteredThemes(): Theme[];
389
+ /** @internal — used by themeLibrary's `resolveTheme` to check the registry first. */
390
+ declare function lookupRegisteredTheme(id: string | undefined): Theme | undefined;
352
391
 
353
392
  /**
354
393
  * Block Templates Schema
355
394
  *
356
395
  * Defines a template system for AI-generated doc blocks. Instead of
357
396
  * specifying low-level layers, positions, and animations, AI can use
358
- * high-level templates like "titleBlock" or "statHighlight" with simple
397
+ * high-level templates like "title" or "statHighlight" with simple
359
398
  * content parameters.
360
399
  *
361
400
  * Templates are expanded into full Block structures at render time,
362
401
  * ensuring consistent styling and reducing AI generation errors.
363
402
  *
364
403
  * Template Types:
365
- * - titleBlock: Doc intro with title + subtitle
404
+ * - title: Doc intro with title + subtitle
366
405
  * - sectionHeader: Colored section divider
367
406
  * - statHighlight: Big number/stat with description
368
- * - quoteBlock: Large centered quote
407
+ * - quote: Large centered quote
369
408
  * - factCard: Key fact with explanation
370
409
  * - twoColumn: Side-by-side comparison
371
410
  * - dateEvent: Timeline-style date + description
@@ -443,7 +482,7 @@ interface BaseTemplateBlock {
443
482
  * Title block - doc intro with large title and subtitle.
444
483
  */
445
484
  interface TitleBlockInput extends BaseTemplateBlock {
446
- template: 'titleBlock';
485
+ template: 'title';
447
486
  /** Main title text */
448
487
  title: string;
449
488
  /** Subtitle or tagline (supports \n for line breaks) */
@@ -488,7 +527,7 @@ interface StatHighlightInput extends BaseTemplateBlock {
488
527
  * Quote block - large centered quote text.
489
528
  */
490
529
  interface QuoteBlockInput extends BaseTemplateBlock {
491
- template: 'quoteBlock';
530
+ template: 'quote';
492
531
  /** The quote text (supports \n for line breaks) */
493
532
  quote: string;
494
533
  /** Attribution (author, source) */
@@ -571,6 +610,44 @@ interface ImageWithCaptionInput extends BaseTemplateBlock {
571
610
  /** License identifier (e.g., 'CC BY-SA 4.0') */
572
611
  imageLicense?: string;
573
612
  }
613
+ /**
614
+ * Shared fields for left/right feature blocks. A "feature" pairs an
615
+ * image on one side of the block with a title and body paragraph on
616
+ * the other — a common editorial layout for product highlights,
617
+ * profile callouts, or section intros.
618
+ */
619
+ interface FeatureInputBase extends BaseTemplateBlock {
620
+ /** Path to the feature image. */
621
+ imageSrc: string;
622
+ /** Alt text for accessibility. */
623
+ imageAlt?: string;
624
+ /**
625
+ * Explicit display width of the image, in pixels (typically pulled
626
+ * from a `<img width>` attribute when the WYSIWYG editor resized it).
627
+ * When set, the renderer treats the image as a sized asset and
628
+ * centers it inside its half with padding instead of stretching it
629
+ * to fill the cell.
630
+ */
631
+ imageWidth?: number;
632
+ /** Explicit display height of the image, in pixels. */
633
+ imageHeight?: number;
634
+ /** Heading / title text shown next to the image. */
635
+ title?: string;
636
+ /** Body text shown below the title. */
637
+ body?: string;
638
+ }
639
+ /**
640
+ * Left feature — image on the left, title + body stacked on the right.
641
+ */
642
+ interface LeftFeatureInput extends FeatureInputBase {
643
+ template: 'leftFeature';
644
+ }
645
+ /**
646
+ * Right feature — image on the right, title + body stacked on the left.
647
+ */
648
+ interface RightFeatureInput extends FeatureInputBase {
649
+ template: 'rightFeature';
650
+ }
574
651
  /**
575
652
  * Map block - geographic map showing article location.
576
653
  *
@@ -579,7 +656,7 @@ interface ImageWithCaptionInput extends BaseTemplateBlock {
579
656
  * See docs/MAP_TILES.md for available tile styles and attribution.
580
657
  */
581
658
  interface MapBlockInput extends BaseTemplateBlock {
582
- template: 'mapBlock';
659
+ template: 'map';
583
660
  /** Map center coordinates */
584
661
  center: {
585
662
  lat: number;
@@ -616,7 +693,7 @@ interface FullBleedQuoteInput extends BaseTemplateBlock {
616
693
  * Good for enumerations like "things to see" or "key features".
617
694
  */
618
695
  interface ListBlockInput extends BaseTemplateBlock {
619
- template: 'listBlock';
696
+ template: 'list';
620
697
  /** List items (3-5 recommended) */
621
698
  items: string[];
622
699
  /** Optional header above the list */
@@ -769,7 +846,7 @@ interface DataTableInput extends BaseTemplateBlock {
769
846
  /**
770
847
  * Union of all template block types.
771
848
  */
772
- type TemplateBlock = TitleBlockInput | SectionHeaderInput | StatHighlightInput | QuoteBlockInput | FactCardInput | TwoColumnInput | DateEventInput | ImageWithCaptionInput | MapBlockInput | FullBleedQuoteInput | ListBlockInput | PhotoGridInput | DefinitionCardInput | ComparisonBarInput | PullQuoteInput | VideoWithCaptionInput | VideoPullQuoteInput | DataTableInput;
849
+ type TemplateBlock = TitleBlockInput | SectionHeaderInput | StatHighlightInput | QuoteBlockInput | FactCardInput | TwoColumnInput | DateEventInput | ImageWithCaptionInput | LeftFeatureInput | RightFeatureInput | MapBlockInput | FullBleedQuoteInput | ListBlockInput | PhotoGridInput | DefinitionCardInput | ComparisonBarInput | PullQuoteInput | VideoWithCaptionInput | VideoPullQuoteInput | DataTableInput;
773
850
  /**
774
851
  * A block can be either a raw Block or a TemplateBlock.
775
852
  */
@@ -1448,4 +1525,4 @@ declare function getCaptionAtTime(captions: CaptionTrack | undefined, time: numb
1448
1525
  */
1449
1526
  declare function validateDoc(script: Doc): string[];
1450
1527
 
1451
- export { type StartBlockConfig as $, type AccentImage as A, type Block as B, type CaptionPhrase as C, DARK_SURFACE as D, type MapLayer as E, type FactCardInput as F, type GradientBackgroundConfig as G, type MapMarker as H, type ImageBackgroundConfig as I, type MapTileStyle as J, type PersistentLayer as K, LIGHT_SURFACE as L, type MapBlockInput as M, type PersistentLayerConfig as N, type PersistentLayerTemplate as O, type PatternBackgroundConfig as P, type PersistentLayerTemplateConfig as Q, type PersistentLayerTemplateType as R, type PhotoGridInput as S, type Position as T, type ProgressIndicatorConfig as U, type PullQuoteInput as V, type QuoteBlockInput as W, type RenderStyle as X, type SectionHeaderInput as Y, type ShapeLayer as Z, type SolidBackgroundConfig as _, type AccentPosition as a, type StatHighlightInput as a0, type SurfaceScheme as a1, type TableLayer as a2, type TableLayerStyle as a3, type TemplateBlock as a4, type TemplateContext as a5, type TemplateFunction as a6, type TemplateRegistry as a7, type TextLayer as a8, type TextStyle as a9, getSafeTextBounds as aA, getSegmentAtTime as aB, getTwoColumnPositions as aC, getViewport as aD, getViewportOrientation as aE, isPersistentLayerTemplate as aF, isTemplateBlock as aG, scaledFontSize$1 as aH, scaledFontSize as aI, validateDoc as aJ, type Theme as aa, type ThemeColorPalette as ab, type ThemeColorScheme as ac, type ThemeStyle as ad, type ThemeTypography as ae, type TitleBlockInput as af, type TitleCaptionConfig as ag, type Transition as ah, type TransitionType as ai, type TwoColumnInput as aj, VIEWPORT_PRESETS as ak, type VideoLayer as al, type VideoPullQuoteInput as am, type VideoWithCaptionInput as an, type ViewportConfig as ao, type ViewportOrientation as ap, type ViewportPreset as aq, applySurface as ar, calculateDuration as as, calculateFontScale as at, createTemplateContext as au, createTheme as av, getAspectRatioString as aw, getBlockAtTime as ax, getCaptionAtTime as ay, getLayoutHints as az, type Animation as b, type AnimationType as c, type AudioBookmark as d, type AudioSegment as e, type AudioTimingData as f, type AudioTrack as g, type CaptionTrack as h, type CaptionWord as i, type ColorScheme as j, type ComparisonBarInput as k, type CornerBrandingConfig as l, DEFAULT_DOC_FONT as m, DEFAULT_TITLE_FONT as n, type DataTableInput as o, type DateEventInput as p, type DeepPartial as q, type DefinitionCardInput as r, type Doc as s, type DocBlock as t, type FullBleedQuoteInput as u, type ImageLayer as v, type ImageWithCaptionInput as w, type Layer as x, type LayoutHints as y, type ListBlockInput as z };
1528
+ export { type RightFeatureInput as $, type AccentImage as A, type Block as B, type CaptionPhrase as C, DARK_SURFACE as D, type LayoutHints as E, type FactCardInput as F, type GradientBackgroundConfig as G, type LeftFeatureInput as H, type ImageBackgroundConfig as I, type ListBlockInput as J, type MapLayer as K, LIGHT_SURFACE as L, type MapBlockInput as M, type MapMarker as N, type MapTileStyle as O, type PatternBackgroundConfig as P, type PersistentLayer as Q, type PersistentLayerConfig as R, type PersistentLayerTemplate as S, type PersistentLayerTemplateConfig as T, type PersistentLayerTemplateType as U, type PhotoGridInput as V, type Position as W, type ProgressIndicatorConfig as X, type PullQuoteInput as Y, type QuoteBlockInput as Z, type RenderStyle as _, type AccentPosition as a, type SectionHeaderInput as a0, type ShapeLayer as a1, type SolidBackgroundConfig as a2, type StartBlockConfig as a3, type StatHighlightInput as a4, type SurfaceScheme as a5, THEME_SCHEMA_VERSION as a6, type TableLayer as a7, type TableLayerStyle as a8, type TemplateBlock as a9, calculateFontScale as aA, createTemplateContext as aB, createTheme as aC, getAspectRatioString as aD, getBlockAtTime as aE, getCaptionAtTime as aF, getLayoutHints as aG, getRegisteredThemes as aH, getSafeTextBounds as aI, getSegmentAtTime as aJ, getTwoColumnPositions as aK, getViewport as aL, getViewportOrientation as aM, isPersistentLayerTemplate as aN, isTemplateBlock as aO, scaledFontSize$1 as aP, lookupRegisteredTheme as aQ, registerTheme as aR, scaledFontSize as aS, unregisterTheme as aT, validateDoc as aU, type TemplateContext as aa, type TemplateFunction as ab, type TemplateRegistry as ac, type TextLayer as ad, type TextStyle as ae, type Theme as af, type ThemeColorPalette as ag, type ThemeColorScheme as ah, type ThemeSchemaVersion as ai, type ThemeSeedColors as aj, type ThemeStyle as ak, type ThemeTypography as al, type TitleBlockInput as am, type TitleCaptionConfig as an, type Transition as ao, type TransitionType as ap, type TwoColumnInput as aq, VIEWPORT_PRESETS as ar, type VideoLayer as as, type VideoPullQuoteInput as at, type VideoWithCaptionInput as au, type ViewportConfig as av, type ViewportOrientation as aw, type ViewportPreset as ax, applySurface as ay, calculateDuration as az, type Animation as b, type AnimationType as c, type AudioBookmark as d, type AudioSegment as e, type AudioTimingData as f, type AudioTrack as g, type CaptionTrack as h, type CaptionWord as i, type ColorScheme as j, type ComparisonBarInput as k, type CornerBrandingConfig as l, DEFAULT_DOC_FONT as m, DEFAULT_TITLE_FONT as n, type DataTableInput as o, type DateEventInput as p, type DeepPartial as q, type DefinitionCardInput as r, type Doc as s, type DocBlock as t, type FontFamily as u, type FontFamilyKind as v, type FullBleedQuoteInput as w, type ImageLayer as x, type ImageWithCaptionInput as y, type Layer as z };
@@ -0,0 +1,84 @@
1
+ import { x as ImageLayer, ad as TextLayer, a1 as ShapeLayer } from './Doc-BeSeH2iX.js';
2
+
3
+ /**
4
+ * ImageEditDoc — JSON document describing a layered, editable image.
5
+ *
6
+ * This is the persistent state of the `<ImageEditor>` component. It lives
7
+ * inside a `<imagebasename>_files/` sidecar folder (exposed as a
8
+ * {@link ContentContainer}) at `state.json`, alongside referenced asset
9
+ * bytes in `assets/` and version snapshots in `.versions/`.
10
+ *
11
+ * Layers compose the existing core {@link Layer} types (image / text /
12
+ * shape) so renderers can share infrastructure with the doc system.
13
+ * Editor-specific metadata (name, visibility, lock, opacity, blendMode)
14
+ * lives in {@link EditorLayerMeta} and is merged onto each layer. The
15
+ * {@link Layer.animation} field is permitted but ignored by the image
16
+ * editor — animations are a slideshow concept.
17
+ *
18
+ * All asset paths in layers (e.g. `ImageLayer.content.src`) are
19
+ * relative to the sidecar root, keeping the document portable.
20
+ */
21
+
22
+ /**
23
+ * Per-layer editor metadata. Merged into each layer so the persisted
24
+ * shape is a single object. All fields optional; sensible defaults
25
+ * apply when absent (visible: true, locked: false, opacity: 1).
26
+ */
27
+ interface EditorLayerMeta {
28
+ /** Human-readable name shown in the layers panel. */
29
+ name?: string;
30
+ /** When false, the layer is hidden from rendering. Default true. */
31
+ visible?: boolean;
32
+ /** When true, the layer cannot be selected/edited. Default false. */
33
+ locked?: boolean;
34
+ /** 0..1 multiplier on the layer's alpha. Default 1. */
35
+ opacity?: number;
36
+ /**
37
+ * Canvas blend mode (matches the CSS / Canvas2D vocabulary).
38
+ * Default 'source-over' (normal compositing).
39
+ */
40
+ blendMode?: GlobalCompositeOperation;
41
+ }
42
+ /** A layer in an {@link ImageEditDoc}. */
43
+ type ImageEditLayer = (ImageLayer | TextLayer | ShapeLayer) & EditorLayerMeta;
44
+ /** The layer kinds the image editor supports. */
45
+ type ImageEditLayerKind = ImageEditLayer['type'];
46
+ /** Canvas dimensions and background. */
47
+ interface ImageEditCanvas {
48
+ /** Canvas width in pixels. */
49
+ width: number;
50
+ /** Canvas height in pixels. */
51
+ height: number;
52
+ /**
53
+ * Background fill (CSS color, or `'transparent'` for an alpha canvas).
54
+ * Default: `'transparent'`.
55
+ */
56
+ background?: string;
57
+ }
58
+ /** Optional document metadata. */
59
+ interface ImageEditMeta {
60
+ /** Path to the original source image (sidecar-relative). Set when the doc is seeded from an existing image. */
61
+ sourcePath?: string;
62
+ /** ISO timestamp set on first save. */
63
+ createdAt?: string;
64
+ /** ISO timestamp updated on every save. */
65
+ updatedAt?: string;
66
+ }
67
+ /**
68
+ * The persisted image-editor document.
69
+ *
70
+ * Layers are composited back-to-front: `layers[0]` is the bottom of the stack
71
+ * (typically the base raster), `layers[layers.length - 1]` is the top.
72
+ */
73
+ interface ImageEditDoc {
74
+ /** Schema version. Bumped on breaking changes. */
75
+ version: 1;
76
+ /** Canvas configuration. */
77
+ canvas: ImageEditCanvas;
78
+ /** Layers, back-to-front. */
79
+ layers: ImageEditLayer[];
80
+ /** Optional metadata. */
81
+ meta?: ImageEditMeta;
82
+ }
83
+
84
+ export type { EditorLayerMeta as E, ImageEditCanvas as I, ImageEditDoc as a, ImageEditLayer as b, ImageEditLayerKind as c, ImageEditMeta as d };
@@ -229,6 +229,77 @@ function guessMimeType(path) {
229
229
  return EXTENSION_MIME_MAP[ext] ?? "application/octet-stream";
230
230
  }
231
231
 
232
+ // src/storage/ScopedContentContainer.ts
233
+ function normalizePrefix(prefix) {
234
+ let p = prefix.trim();
235
+ while (p.startsWith("/")) p = p.slice(1);
236
+ while (p.endsWith("/")) p = p.slice(0, -1);
237
+ if (p.length === 0) {
238
+ throw new Error("ScopedContentContainer: prefix must not be empty");
239
+ }
240
+ if (p.split("/").some((seg) => seg === ".." || seg === ".")) {
241
+ throw new Error(
242
+ `ScopedContentContainer: prefix must not contain '.' or '..' segments: ${prefix}`
243
+ );
244
+ }
245
+ return p;
246
+ }
247
+ var ScopedContentContainer = class {
248
+ constructor(parent, prefix) {
249
+ this.parent = parent;
250
+ this.prefix = normalizePrefix(prefix);
251
+ this.prefixSlash = `${this.prefix}/`;
252
+ }
253
+ toParent(path) {
254
+ let p = path;
255
+ while (p.startsWith("/")) p = p.slice(1);
256
+ return this.prefixSlash + p;
257
+ }
258
+ /** Strip the prefix from a parent-space path. Returns null if the path is outside the scope. */
259
+ fromParent(parentPath) {
260
+ if (!parentPath.startsWith(this.prefixSlash)) return null;
261
+ return parentPath.slice(this.prefixSlash.length);
262
+ }
263
+ readFile(path) {
264
+ return this.parent.readFile(this.toParent(path));
265
+ }
266
+ writeFile(path, data, mimeType) {
267
+ return this.parent.writeFile(this.toParent(path), data, mimeType);
268
+ }
269
+ removeFile(path) {
270
+ return this.parent.removeFile(this.toParent(path));
271
+ }
272
+ async listFiles(prefix) {
273
+ const parentPrefix = prefix ? this.toParent(prefix) : this.prefixSlash;
274
+ const entries = await this.parent.listFiles(parentPrefix);
275
+ const out = [];
276
+ for (const e of entries) {
277
+ const local = this.fromParent(e.path);
278
+ if (local === null) continue;
279
+ out.push({ path: local, mimeType: e.mimeType, size: e.size });
280
+ }
281
+ return out;
282
+ }
283
+ exists(path) {
284
+ return this.parent.exists(this.toParent(path));
285
+ }
286
+ /** Sidecars are not document roots. */
287
+ async getDocumentPath() {
288
+ return null;
289
+ }
290
+ async readDocument() {
291
+ return null;
292
+ }
293
+ async writeDocument() {
294
+ throw new Error(
295
+ "ScopedContentContainer is a sidecar view and does not support writeDocument(). Write to a specific path with writeFile() instead."
296
+ );
297
+ }
298
+ };
299
+ function scopeContainer(parent, prefix) {
300
+ return new ScopedContentContainer(parent, prefix);
301
+ }
302
+
232
303
  // src/storage/MediaProviderFromContainer.ts
233
304
  function createMediaProviderFromContainer(container) {
234
305
  const blobUrlCache = /* @__PURE__ */ new Map();
@@ -292,6 +363,8 @@ export {
292
363
  LocalForageAdapter,
293
364
  findDocumentPath,
294
365
  MemoryContentContainer,
366
+ ScopedContentContainer,
367
+ scopeContainer,
295
368
  createMediaProviderFromContainer
296
369
  };
297
- //# sourceMappingURL=chunk-CYQHG27J.js.map
370
+ //# sourceMappingURL=chunk-2TMAWB4Y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/storage/MemoryStorageAdapter.ts","../src/storage/LocalStorageAdapter.ts","../src/storage/LocalForageAdapter.ts","../src/storage/ContentContainer.ts","../src/storage/ScopedContentContainer.ts","../src/storage/MediaProviderFromContainer.ts"],"sourcesContent":["/**\n * In-memory storage adapter for testing and SSR environments.\n * Data does not persist across page reloads.\n */\n\nimport type { StorageAdapter } from './Storage.js';\n\nexport class MemoryStorageAdapter implements StorageAdapter {\n readonly supportsEnumeration = true;\n private store = new Map<string, string>();\n\n async get<T>(key: string): Promise<T | null> {\n const val = this.store.get(key);\n if (val === undefined) return null;\n try {\n return JSON.parse(val) as T;\n } catch {\n return null;\n }\n }\n\n async set<T>(key: string, value: T): Promise<void> {\n this.store.set(key, JSON.stringify(value));\n }\n\n async remove(key: string): Promise<void> {\n this.store.delete(key);\n }\n\n async clear(): Promise<void> {\n this.store.clear();\n }\n\n async keys(): Promise<string[]> {\n return Array.from(this.store.keys());\n }\n}\n","/**\n * localStorage adapter for web browsers.\n * Supports a configurable key prefix to namespace stored data.\n */\n\nimport type { StorageAdapter } from './Storage.js';\n\nexport class LocalStorageAdapter implements StorageAdapter {\n readonly supportsEnumeration = true;\n private prefix: string;\n\n constructor(prefix = '') {\n this.prefix = prefix;\n }\n\n async get<T>(key: string): Promise<T | null> {\n try {\n const raw = localStorage.getItem(this.prefix + key);\n if (raw === null) return null;\n return JSON.parse(raw) as T;\n } catch {\n return null;\n }\n }\n\n async set<T>(key: string, value: T): Promise<void> {\n localStorage.setItem(this.prefix + key, JSON.stringify(value));\n }\n\n async remove(key: string): Promise<void> {\n localStorage.removeItem(this.prefix + key);\n }\n\n async clear(): Promise<void> {\n const keysToRemove: string[] = [];\n for (let i = 0; i < localStorage.length; i++) {\n const k = localStorage.key(i);\n if (k && k.startsWith(this.prefix)) {\n keysToRemove.push(k);\n }\n }\n for (const k of keysToRemove) {\n localStorage.removeItem(k);\n }\n }\n\n async keys(): Promise<string[]> {\n const result: string[] = [];\n for (let i = 0; i < localStorage.length; i++) {\n const k = localStorage.key(i);\n if (k && k.startsWith(this.prefix)) {\n result.push(k.slice(this.prefix.length));\n }\n }\n return result;\n }\n}\n","/**\n * LocalForage adapter - IndexedDB storage with automatic fallbacks.\n *\n * Uses localforage which provides IndexedDB storage with automatic\n * fallbacks to WebSQL and localStorage. This allows storing much more\n * data than raw localStorage (which is limited to ~5MB).\n *\n * Unlike LocalStorageAdapter, this adapter can store binary data\n * (ArrayBuffer, Blob, Uint8Array) natively without JSON serialization.\n *\n * Ported from qualla-internal/shared/services/StorageAdapters.ts with\n * configurable store name and key prefix.\n */\n\nimport localforage from 'localforage';\nimport type { StorageAdapter } from './Storage.js';\n\nexport interface LocalForageAdapterOptions {\n /** IndexedDB database name (default: 'squisq') */\n name?: string;\n /** IndexedDB object store name (default: 'data') */\n storeName?: string;\n /** Key prefix for namespacing (default: '') */\n prefix?: string;\n /** Human-readable description (default: 'Squisq storage') */\n description?: string;\n}\n\nexport class LocalForageAdapter implements StorageAdapter {\n readonly supportsEnumeration = true;\n private store: LocalForage;\n private prefix: string;\n\n constructor(options: LocalForageAdapterOptions = {}) {\n const {\n name = 'squisq',\n storeName = 'data',\n prefix = '',\n description = 'Squisq storage',\n } = options;\n\n this.prefix = prefix;\n this.store = localforage.createInstance({ name, storeName, description });\n }\n\n async get<T>(key: string): Promise<T | null> {\n try {\n const value = await this.store.getItem<T>(this.prefix + key);\n return value;\n } catch (e: unknown) {\n console.warn('[Storage] get (IndexedDB) failed:', key, e);\n return null;\n }\n }\n\n async set<T>(key: string, value: T): Promise<void> {\n try {\n await this.store.setItem(this.prefix + key, value);\n } catch (e: unknown) {\n console.error('[Storage] set (IndexedDB) failed:', key, e);\n throw e;\n }\n }\n\n async remove(key: string): Promise<void> {\n try {\n await this.store.removeItem(this.prefix + key);\n } catch (e: unknown) {\n console.warn('[Storage] remove (IndexedDB) failed:', key, e);\n }\n }\n\n async clear(): Promise<void> {\n try {\n if (this.prefix) {\n // Only remove keys with our prefix\n const keys = await this.store.keys();\n const keysToRemove = keys.filter((k) => k.startsWith(this.prefix));\n await Promise.all(keysToRemove.map((k) => this.store.removeItem(k)));\n } else {\n // No prefix — clear the entire store\n await this.store.clear();\n }\n } catch (e: unknown) {\n console.error('[Storage] clear (IndexedDB) failed:', e);\n }\n }\n\n async keys(): Promise<string[]> {\n try {\n const allKeys = await this.store.keys();\n if (this.prefix) {\n return allKeys\n .filter((k) => k.startsWith(this.prefix))\n .map((k) => k.slice(this.prefix.length));\n }\n return allKeys;\n } catch (e: unknown) {\n console.warn('[Storage] keys (IndexedDB) failed:', e);\n return [];\n }\n }\n}\n","/**\n * ContentContainer — virtual file system for document containers.\n *\n * A Squisq document is more than just markdown: it's a container of files\n * including the primary markdown document, images, audio, timing data, and\n * other media. ContentContainer provides an abstract async file system\n * interface for reading, writing, and listing these files.\n *\n * Paths are forward-slash separated strings relative to the container root\n * (e.g., 'images/hero.jpg', 'index.md'). No leading slash.\n *\n * Implementations:\n * - MemoryContentContainer — in-memory Map (for zip import, tests, transient use)\n * - SlotContentContainer — backed by IndexedDB slot storage (in the site package)\n */\n\n/**\n * Metadata about a file in a ContentContainer.\n */\nexport interface ContentEntry {\n /** Relative path within the container (e.g., 'images/hero.jpg') */\n path: string;\n /** MIME type (e.g., 'image/jpeg') */\n mimeType: string;\n /** File size in bytes */\n size: number;\n}\n\n/**\n * Abstract async file system for document containers.\n *\n * All paths are forward-slash separated, relative to the container root,\n * with no leading slash. Example: 'images/hero.jpg', 'index.md'.\n */\nexport interface ContentContainer {\n /** Read a file's binary content. Returns null if the file does not exist. */\n readFile(path: string): Promise<ArrayBuffer | null>;\n\n /** Write a file. Creates or overwrites. */\n writeFile(path: string, data: ArrayBuffer | Uint8Array, mimeType?: string): Promise<void>;\n\n /** Remove a file. No-op if the file does not exist. */\n removeFile(path: string): Promise<void>;\n\n /**\n * List files in the container.\n * @param prefix — Optional path prefix to filter by (e.g., 'images/')\n */\n listFiles(prefix?: string): Promise<ContentEntry[]>;\n\n /** Check whether a file exists. */\n exists(path: string): Promise<boolean>;\n\n /**\n * Find the primary markdown document path.\n *\n * Discovery order: index.md → doc.md → document.md → first *.md at root.\n * Returns null if no markdown file is found at the root level.\n */\n getDocumentPath(): Promise<string | null>;\n\n /**\n * Convenience: read the primary markdown document as a UTF-8 string.\n * Returns null if no markdown file is found.\n */\n readDocument(): Promise<string | null>;\n\n /**\n * Convenience: write a markdown document.\n * @param markdown — The markdown content\n * @param filename — Filename to use (defaults to 'index.md')\n */\n writeDocument(markdown: string, filename?: string): Promise<void>;\n}\n\n// ============================================\n// Well-known markdown filenames in priority order\n// ============================================\n\nconst MARKDOWN_PRIORITY = ['index.md', 'doc.md', 'document.md'];\n\n/**\n * Find the primary markdown path from a list of file entries.\n * Exported for reuse by other ContentContainer implementations.\n */\nexport function findDocumentPath(entries: ContentEntry[]): string | null {\n // Only consider root-level files (no '/' in path)\n const rootFiles = entries.filter((e) => !e.path.includes('/'));\n\n for (const name of MARKDOWN_PRIORITY) {\n if (rootFiles.some((e) => e.path.toLowerCase() === name)) {\n return name;\n }\n }\n\n // Fallback: first .md file at root\n const firstMd = rootFiles.find((e) => e.path.toLowerCase().endsWith('.md'));\n return firstMd?.path ?? null;\n}\n\n// ============================================\n// MemoryContentContainer\n// ============================================\n\ninterface MemoryFile {\n data: ArrayBuffer;\n mimeType: string;\n}\n\n/**\n * In-memory ContentContainer backed by a Map.\n *\n * Used for zip import (deserialize into memory), tests, and transient operations.\n */\nexport class MemoryContentContainer implements ContentContainer {\n private files = new Map<string, MemoryFile>();\n\n async readFile(path: string): Promise<ArrayBuffer | null> {\n return this.files.get(path)?.data ?? null;\n }\n\n async writeFile(path: string, data: ArrayBuffer | Uint8Array, mimeType?: string): Promise<void> {\n // Copy to a standalone ArrayBuffer. Uint8Array/Buffer may share a larger\n // backing buffer (e.g., Node's buffer pool), so we must slice to the\n // exact byte range to avoid storing stale pool data.\n let buffer: ArrayBuffer;\n if (data instanceof ArrayBuffer) {\n buffer = data;\n } else {\n buffer = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength) as ArrayBuffer;\n }\n this.files.set(path, {\n data: buffer,\n mimeType: mimeType ?? guessMimeType(path),\n });\n }\n\n async removeFile(path: string): Promise<void> {\n this.files.delete(path);\n }\n\n async listFiles(prefix?: string): Promise<ContentEntry[]> {\n const entries: ContentEntry[] = [];\n for (const [path, file] of this.files) {\n if (prefix && !path.startsWith(prefix)) continue;\n entries.push({\n path,\n mimeType: file.mimeType,\n size: file.data.byteLength,\n });\n }\n return entries;\n }\n\n async exists(path: string): Promise<boolean> {\n return this.files.has(path);\n }\n\n async getDocumentPath(): Promise<string | null> {\n return findDocumentPath(await this.listFiles());\n }\n\n async readDocument(): Promise<string | null> {\n const docPath = await this.getDocumentPath();\n if (!docPath) return null;\n const data = await this.readFile(docPath);\n if (!data) return null;\n return new TextDecoder().decode(data);\n }\n\n async writeDocument(markdown: string, filename?: string): Promise<void> {\n const name = filename ?? 'index.md';\n const data = new TextEncoder().encode(markdown);\n await this.writeFile(name, data, 'text/markdown');\n }\n}\n\n// ============================================\n// MIME type guessing\n// ============================================\n\nconst EXTENSION_MIME_MAP: Record<string, string> = {\n '.md': 'text/markdown',\n '.txt': 'text/plain',\n '.json': 'application/json',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.png': 'image/png',\n '.gif': 'image/gif',\n '.svg': 'image/svg+xml',\n '.webp': 'image/webp',\n '.avif': 'image/avif',\n '.mp4': 'video/mp4',\n '.webm': 'video/webm',\n '.mp3': 'audio/mpeg',\n '.wav': 'audio/wav',\n '.ogg': 'audio/ogg',\n '.css': 'text/css',\n '.html': 'text/html',\n '.js': 'application/javascript',\n};\n\nfunction guessMimeType(path: string): string {\n const dot = path.lastIndexOf('.');\n if (dot === -1) return 'application/octet-stream';\n const ext = path.slice(dot).toLowerCase();\n return EXTENSION_MIME_MAP[ext] ?? 'application/octet-stream';\n}\n","/**\n * ScopedContentContainer\n *\n * Wraps a parent {@link ContentContainer} and prefixes every path with a\n * fixed subfolder, presenting that subfolder as the root. Useful for\n * sidecar folders (e.g. `<imagebasename>_files/`) where a component\n * should be able to read/write/list files relative to its own root\n * without knowing where it lives in the parent tree.\n *\n * Scopes nest: `scopeContainer(scopeContainer(parent, 'a'), 'b')` is\n * equivalent to `scopeContainer(parent, 'a/b')`.\n *\n * `getDocumentPath()` always returns `null` for scoped sidecars — they\n * are not document roots.\n */\n\nimport type { ContentContainer, ContentEntry } from './ContentContainer.js';\n\n/** Normalize a prefix: strip leading/trailing slashes, ensure no `..` segments. */\nfunction normalizePrefix(prefix: string): string {\n let p = prefix.trim();\n while (p.startsWith('/')) p = p.slice(1);\n while (p.endsWith('/')) p = p.slice(0, -1);\n if (p.length === 0) {\n throw new Error('ScopedContentContainer: prefix must not be empty');\n }\n if (p.split('/').some((seg) => seg === '..' || seg === '.')) {\n throw new Error(\n `ScopedContentContainer: prefix must not contain '.' or '..' segments: ${prefix}`,\n );\n }\n return p;\n}\n\n/**\n * A ContentContainer view rooted at a subfolder of a parent container.\n * All paths passed to / returned from this container are relative to\n * the subfolder; the parent never sees an unprefixed path.\n */\nexport class ScopedContentContainer implements ContentContainer {\n private readonly parent: ContentContainer;\n /** Prefix without trailing slash. */\n readonly prefix: string;\n /** Prefix with trailing slash. */\n private readonly prefixSlash: string;\n\n constructor(parent: ContentContainer, prefix: string) {\n this.parent = parent;\n this.prefix = normalizePrefix(prefix);\n this.prefixSlash = `${this.prefix}/`;\n }\n\n private toParent(path: string): string {\n let p = path;\n while (p.startsWith('/')) p = p.slice(1);\n return this.prefixSlash + p;\n }\n\n /** Strip the prefix from a parent-space path. Returns null if the path is outside the scope. */\n private fromParent(parentPath: string): string | null {\n if (!parentPath.startsWith(this.prefixSlash)) return null;\n return parentPath.slice(this.prefixSlash.length);\n }\n\n readFile(path: string): Promise<ArrayBuffer | null> {\n return this.parent.readFile(this.toParent(path));\n }\n\n writeFile(path: string, data: ArrayBuffer | Uint8Array, mimeType?: string): Promise<void> {\n return this.parent.writeFile(this.toParent(path), data, mimeType);\n }\n\n removeFile(path: string): Promise<void> {\n return this.parent.removeFile(this.toParent(path));\n }\n\n async listFiles(prefix?: string): Promise<ContentEntry[]> {\n const parentPrefix = prefix ? this.toParent(prefix) : this.prefixSlash;\n const entries = await this.parent.listFiles(parentPrefix);\n const out: ContentEntry[] = [];\n for (const e of entries) {\n const local = this.fromParent(e.path);\n if (local === null) continue;\n out.push({ path: local, mimeType: e.mimeType, size: e.size });\n }\n return out;\n }\n\n exists(path: string): Promise<boolean> {\n return this.parent.exists(this.toParent(path));\n }\n\n /** Sidecars are not document roots. */\n async getDocumentPath(): Promise<string | null> {\n return null;\n }\n\n async readDocument(): Promise<string | null> {\n return null;\n }\n\n async writeDocument(): Promise<void> {\n throw new Error(\n 'ScopedContentContainer is a sidecar view and does not support writeDocument(). ' +\n 'Write to a specific path with writeFile() instead.',\n );\n }\n}\n\n/** Factory: convenience wrapper for `new ScopedContentContainer(parent, prefix)`. */\nexport function scopeContainer(parent: ContentContainer, prefix: string): ScopedContentContainer {\n return new ScopedContentContainer(parent, prefix);\n}\n","/**\n * MediaProviderFromContainer — bridges ContentContainer to MediaProvider.\n *\n * Creates a MediaProvider that resolves relative paths by reading binary data\n * from a ContentContainer and generating blob URLs. Blob URLs are cached and\n * revoked on dispose().\n *\n * This allows any ContentContainer (memory, slot-backed, zip-loaded) to be\n * used with existing rendering components (DocPlayer, ImageLayer, VideoLayer)\n * that consume MediaProvider.\n */\n\nimport type { MediaProvider, MediaEntry } from '../schemas/MediaProvider.js';\nimport type { ContentContainer } from './ContentContainer.js';\n\n/**\n * Create a MediaProvider backed by a ContentContainer.\n *\n * @param container — The ContentContainer to read/write media from\n * @returns A MediaProvider that resolves paths to blob URLs\n */\nexport function createMediaProviderFromContainer(container: ContentContainer): MediaProvider {\n const blobUrlCache = new Map<string, string>();\n\n return {\n async resolveUrl(relativePath: string): Promise<string> {\n const cached = blobUrlCache.get(relativePath);\n if (cached) return cached;\n\n const data = await container.readFile(relativePath);\n if (!data) return relativePath;\n\n const entries = await container.listFiles();\n const entry = entries.find((e) => e.path === relativePath);\n const mimeType = entry?.mimeType ?? 'application/octet-stream';\n\n const blob = new Blob([data], { type: mimeType });\n const url = URL.createObjectURL(blob);\n blobUrlCache.set(relativePath, url);\n return url;\n },\n\n async listMedia(): Promise<MediaEntry[]> {\n const entries = await container.listFiles();\n return entries\n .filter((e) => !e.path.toLowerCase().endsWith('.md'))\n .map((e) => ({\n name: e.path,\n mimeType: e.mimeType,\n size: e.size,\n }));\n },\n\n async addMedia(\n name: string,\n data: ArrayBuffer | Blob | Uint8Array,\n mimeType: string,\n ): Promise<string> {\n // Invalidate any cached blob URL for this path before overwriting\n const cached = blobUrlCache.get(name);\n if (cached) {\n URL.revokeObjectURL(cached);\n blobUrlCache.delete(name);\n }\n\n let buffer: ArrayBuffer | Uint8Array;\n if (data instanceof Blob) {\n buffer = await data.arrayBuffer();\n } else {\n buffer = data;\n }\n await container.writeFile(name, buffer, mimeType);\n return name;\n },\n\n async removeMedia(relativePath: string): Promise<void> {\n const cached = blobUrlCache.get(relativePath);\n if (cached) {\n URL.revokeObjectURL(cached);\n blobUrlCache.delete(relativePath);\n }\n await container.removeFile(relativePath);\n },\n\n dispose(): void {\n for (const url of blobUrlCache.values()) {\n URL.revokeObjectURL(url);\n }\n blobUrlCache.clear();\n },\n };\n}\n"],"mappings":";AAOO,IAAM,uBAAN,MAAqD;AAAA,EAArD;AACL,SAAS,sBAAsB;AAC/B,SAAQ,QAAQ,oBAAI,IAAoB;AAAA;AAAA,EAExC,MAAM,IAAO,KAAgC;AAC3C,UAAM,MAAM,KAAK,MAAM,IAAI,GAAG;AAC9B,QAAI,QAAQ,OAAW,QAAO;AAC9B,QAAI;AACF,aAAO,KAAK,MAAM,GAAG;AAAA,IACvB,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,MAAM,IAAO,KAAa,OAAyB;AACjD,SAAK,MAAM,IAAI,KAAK,KAAK,UAAU,KAAK,CAAC;AAAA,EAC3C;AAAA,EAEA,MAAM,OAAO,KAA4B;AACvC,SAAK,MAAM,OAAO,GAAG;AAAA,EACvB;AAAA,EAEA,MAAM,QAAuB;AAC3B,SAAK,MAAM,MAAM;AAAA,EACnB;AAAA,EAEA,MAAM,OAA0B;AAC9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